package MyProxy.Static;

import MyProxy.IUserDao;

/**
 * Created by sunyuming on 18/4/29.
 */
public class UserDaoProxy implements IUserDao {

    private IUserDao target;
    public UserDaoProxy(IUserDao target){
        this.target = target;
    }

    @Override
    public void save() {
        System.out.println("开始事务static");
        target.save();//执行目标对象的方法
        System.out.println("提交事务static");
    }
}
